| DWORD Wait() It waits until the event is in the signaled state Google Microsoft
|
| DWORD Wait(DWORD milliseconds) It waits until the event is in the signaled state or the time-out interval elapses Google Microsoft
|
| EventI() |
| HANDLE Create(LPSECURITY_ATTRIBUTES eventAttributes, bool isManualReset, bool initiallySignaled, const wchar_t* name) It creates or opens a named or unnamed event object Google Microsoft
|
| HANDLE GetHandle(void) |
| bool CreateAutoReset(bool initiallySignaled) The system automatically resets the event state to nonsignaled after a single waiting thread has been released Google Microsoft
|
| bool CreateManualReset(bool initiallySignaled) It requires the use of the event.Reset function to set the event state to nonsignaled Google Microsoft
|
| bool Open(DWORD dwDesiredAccess, bool inheritHandle, const wchar_t* name) It enables multiple processes to open handles of the same event object. The function succeeds only if some process has already created the event by using the event.CreateEvent function Google Microsoft
|
| bool Reset() It sets the state of the event to nonsignaled until explicitly set to signaled by the event.Set member function. This causes all threads wishing to access this event to wait. This function is ONLY used for manual-reset events
|
| bool Set() It sets the state of the event to signaled, releasing any waiting threads If the event is manual, the event will remain signaled until event.Reset is called. More than one thread can be released in this case. If the event is automatic, the event will remain signaled until a single thread is released. The system will then set the state of the event to nonsignaled. If no threads are waiting, the state remains signaled until one thread is released Google Microsoft
|
| operator HANDLE() const |
| operator const HANDLE() const |
| ~ EventI() |
| # endif bool PostStatus(ULONG_PTR compKey) It posts an I/O completion packet to an I/O completion port. This function simulates an I/O operation completion to unblock a called to GetStatus Google Microsoft
|
| # ifdef WIN_SOCKETS_SUPPORT bool AssociateSocket(SOCKET hSocket, ULONG_PTR compKey) It associates an I/O completion port with a socket Google Microsoft
|
| IOCport() |
| IOCport(int maxConcurrency) |
| bool AssociateDevice(HANDLE hDevice, ULONG_PTR compKey) It associates an I/O completion port with a handle Google Microsoft
|
| bool Create(int maxConcurrency) You do not need to call this function, unless you need to change maxConcurrency Google Microsoft
|
| bool GetStatus(ULONG_PTR& compKey) It attempts to dequeue an I/O completion packet from the specified I/O completion port. If there is no completion packet queued, the function waits for a pending I/O operation associated with the completion port to complete. This function is similar to ::WaitForMultipleObjects compKey: pointer to a variable that receives the completion key value associated with the file handle whose I/O operation has completed. Google Microsoft
|
| bool GetStatus(ULONG_PTR& compKey, DWORD& numBytes) It attempts to dequeue an I/O completion packet from the specified I/O completion port. If there is no completion packet queued, the function waits for a pending I/O operation associated with the completion port to complete. This function is similar to ::WaitForMultipleObjects compKey: pointer to a variable that receives the completion key value associated with the file handle whose I/O operation has completed. numBytes: pointer to a variable that receives the number of bytes transferred during an I/O operation that has completed Google Microsoft
|
| bool GetStatus(ULONG_PTR& compKey, DWORD& numBytes, OVERLAPPED* * ppOverlapped) It attempts to dequeue an I/O completion packet from the specified I/O completion port. If there is no completion packet queued, the function waits for a pending I/O operation associated with the completion port to complete. This function is similar to ::WaitForMultipleObjects compKey: pointer to a variable that receives the completion key value associated with the file handle whose I/O operation has completed. numBytes: pointer to a variable that receives the number of bytes transferred during an I/O operation that has completed ppOverlapped:: pointer to a variable that receives the address of the OVERLAPPED structure that was specified when the completed I/O operation was started. Google Microsoft
|
| bool GetStatus(ULONG_PTR& compKey, DWORD& numBytes, OVERLAPPED* * ppOverlapped, DWORD milliseconds) It attempts to dequeue an I/O completion packet from the specified I/O completion port. If there is no completion packet queued, the function waits for a pending I/O operation associated with the completion port to complete. This function is similar to ::WaitForMultipleObjects compKey: pointer to a variable that receives the completion key value associated with the file handle whose I/O operation has completed. numBytes: pointer to a variable that receives the number of bytes transferred during an I/O operation that has completed ppOverlapped:: pointer to a variable that receives the address of the OVERLAPPED structure that was specified when the completed I/O operation was started. milliseconds: the time that the caller is willing to wait for a completion packet to appear at the completion port.If a completion packet does not appear within the specified time Google Microsoft
|
| bool PostStatus(ULONG_PTR compKey, DWORD numBytes) It posts an I/O completion packet to an I/O completion port. This function simulates an I/O operation completion to unblock a called to GetStatus Google Microsoft
|
| bool PostStatus(ULONG_PTR compKey, DWORD numBytes, OVERLAPPED& overlapped) It posts an I/O completion packet to an I/O completion port. This function simulates an I/O operation completion to unblock a called to GetStatus Google Microsoft
|
| ~ IOCport() |
| DWORD Wait() It waits until the Mutex is in the signaled state (This is similar to ::EnterCriticalSection) Google Microsoft
|
| DWORD Wait(DWORD milliseconds) It waits until the Mutex is in the signaled state or the time-out interval elapses (This is similar to ::EnterCriticalSection) Google Microsoft
|
| HANDLE Create(LPSECURITY_ATTRIBUTES& security_attributes, bool initialOwner, const wchar_t* name) It returns a handle if successful, otherwise it returns nullptr
|
| HANDLE Create(bool initialOwner, const wchar_t* name) It returns a handle if successful, otherwise it returns nullptr
|
| HANDLE GetHandle() |
| HANDLE Open(DWORD desiredAccess, bool inheritHandle, const wchar_t* name) Open an existing mutex with a specific name than has been created by any other thread or process It returns a handle if successful, otherwise it returns nullptr
|
| Mutex() |
| bool Release() It release the mutex (this is similar to ::LeaveCritialSection)
|
| operator HANDLE() const |
| operator const HANDLE() const |
| virtual ~ Mutex() |
| void Delete() |
| DWORD Wait() It decrements the semaphore count When you call this function a maximumCount number of times, it will not block (semaphore count is not zero) When you can this function more times than maximumCount, it will block until Release is called (semaphore count is zero) Google Microsoft
|
| DWORD Wait(DWORD milliseconds) It decrements the semaphore count When you call this function a maximumCount number of times, it will not block (semaphore count is not zero) When you can this function more times than maximumCount, it will block until Release is called (semaphore count is zero) Google Microsoft
|
| HANDLE Create(LONG initialCount, LONG maximumCount) It returns a handle if successful, otherwise it returns nullptr
|
| HANDLE Create(LPSECURITY_ATTRIBUTES& security_attributes, LONG initialCount, LONG maximumCount, const wchar_t* name) It returns a handle if successful, otherwise it returns nullptr
|
| HANDLE GetHandle() |
| HANDLE Open(DWORD desiredAccess, bool inheritHandle, const wchar_t* name) It opens an existing named semaphore object
|
| Semaphore() |
| bool Release(LONG releaseCount, LONG& out_previousCount) It releases the semaphore (it increments the semaphore count by the number specified in releaseCount)
|
| operator HANDLE() const |
| operator const HANDLE() const |
| virtual ~ Semaphore() |
| void Delete() |
| Service(void) |
| static void DisplayLastError(const wchar_t* pszWhere, bool bServiceNotification) |
| virtual void Run(const wchar_t* pszUserName, const wchar_t* pszPassword, wchar_t* lpCmdLine, LPSERVICE_MAIN_FUNCTION pServiceFunction) |
| virtual wchar_t* GetDescription() |
| virtual wchar_t* GetDisplayName() |
| virtual wchar_t* GetName() |
| virtual ~ Service(void) |
| void WINAPI ServiceMain(DWORD dwArgc, PTSTR* pszArgv) |
| DWORD ThreadFunc(Mt::ThreadLink& threadLink) |
| Smtp() |
| const wchar_t* TestConnection(const wchar_t* smtpServerName) |
| static void GetTimeHeader(char* buffer, int bufferSize) |
| static void GetTimeHeader(wchar_t* buffer, int bufferSize) |
| virtual ~ Smtp() |
| void Setup(const wchar_t* smtpServerName, const wchar_t* username, const wchar_t* password, int port, bool isSSL, DWORD protocol) For normal SMTP use port 25 For SSL mail such as smtp.gmail.com use port 465 and protocol SP_PROT_TLS1
|
| wchar_t* GetErrorDescr() |
| SocketLink& operator =(const Mt::SocketLink& init) |
| SocketLink() |
| SocketLink(const Mt::SocketLink& init) |
| bool IsConnected() |
| bool NetworkEvent(bool readyRead, bool readySend, bool readyConnect, bool isClosing, Mt::StringArray& statusInfo) |
| bool RecvQueuePop(Mt::SocketPacket& out_socketPacket) |
| size_t GetRecvQueueSize() |
| size_t GetSendQueueSize() |
| void ClearRecvQueue() |
| void ClearSendQueue() |
| void Constructor() |
| void Copy(const Mt::SocketLink& init) |
| void Delete() |
| void Disconnect() |
| void PushInSendQueue(Mt::SocketPacket& socketPacket) |
| void ResetSend() |
| ~ SocketLink() |
| DWORD WaitForExit() It waits until the thread is suspended, it returns one of WAIT_ABANDONED, WAIT_OBJECT_0, WAIT_TIMEOUT, WAIT_FAILED Google Microsoft
|
| HANDLE GetHandle() |
| Mt::SuspendedThread& operator =(const Mt::SuspendedThread& init) |
| SuspendedThread() |
| SuspendedThread(const Mt::SuspendedThread& init) |
| bool IsBusy() |
| bool WakeUp() Call this function to wake up the thread. You need to create a new class derived from Mt::SuspendedThread to call this function and derive ThreadFunc
|
| bool WakeUp(Mt::IThreadX& ithreadX) Call this function to wake up the thread
|
| operator HANDLE() const |
| operator const HANDLE() const |
| virtual DWORD ThreadFunc(Mt::BoolTs& cancel, size_t threadIndex, size_t numThreads) |
| void Delete() It sets the event to stop the thread, then it deletes the thread
|
| ~ SuspendedThread() |
| DWORD WaitForAll() It waits until all the threads in the pool are completed Google Microsoft
|
| DWORD WaitForOne(size_t threadIndex) It wait until the specified thread in the pool completes execution.
|
| Mt::SuspendedThread& operator [ ](size_t threadIndex) |
| Mt::SuspendedThreadPool& operator =(const Mt::SuspendedThreadPool& init) |
| SuspendedThreadPool() |
| SuspendedThreadPool(const Mt::SuspendedThreadPool& init) |
| bool SetNumThreads(size_t numThreads) |
| bool WakeUpOne(size_t threadIndex, Mt::IThreadX& ithreadX) It wakes up the specified thread in the pool. It returns true if successful Google Microsoft
|
| int WaitForOne() It returns the index of the thread that has completed execution or -1 if error Google Microsoft
|
| size_t GetNumBusyThreads() It return the number of threads that are currently busy (running)
|
| size_t GetNumThreads() |
| size_t WakeUp(Mt::IThreadX& ithreadX, size_t numThreads) It wakes up a specified number of threads in the pool. It returns the number of threads that woke up
|
| size_t WakeUpAll(Mt::IThreadX& ithreadX) It wakes up all the threads in the pool. It returns the number of threads that woke up
|
| void Delete() It sets the event of each thread to stop it, then it deletes all threads in the pool
|
| ~ SuspendedThreadPool() |
| DWORD WaitForExit() It waits until verify the thread has stopped. it returns one of WAIT_ABANDONED, WAIT_OBJECT_0, WAIT_TIMEOUT, WAIT_FAILED Google Microsoft
|
| HANDLE BeginThread() It creates a thread. If error, it returns zero. Otherwise, it returns a handle to the new thread . You MUST create a new class overriding ThreadObject::ThreadFunc(...) Google Microsoft
|
| HANDLE BeginThread(Mt::IThread& ithread) It creates a thread. If error, it returns zero. Otherwise, it returns a handle to the new thread Google Microsoft
|
| HANDLE GetHandle() |
| ThreadObject() |
| bool GetExitCode(DWORD& out_threadExitCode) It retrieves the termination status of the specified thread This function returns immediately. If the specified thread has not terminated and the function succeeds, the status returned is STILL_ACTIVE. If the thread has terminated and the function succeeds, the status returned is one of the following values:The exit value specified in the ExitThread or TerminateThread function, the return value from the thread function Google Microsoft
|
| bool IsCancel() |
| bool IsResetTime() |
| bool IsStillActive() |
| bool IsStopAndContinue() |
| double GetProgress() |
| double GetProgressInfo(wchar_t* buffer, int buffer_len) It returns the progress and text information about the progress of the thread
|
| operator HANDLE() const |
| operator const HANDLE() const |
| unsigned int GetThreadID() const |
| void Close() It closes the handle of the thread Google Microsoft
|
| void SetCancel(bool cancel) |
| void SetProgress(double progress) |
| void SetResetTime(bool resetTime) |
| void SetStopAndContinue(bool stopAndContinue) |
| ~ ThreadObject() |
| DWORD WaitForExit() It waits until verify the thread has stopped. it returns one of WAIT_ABANDONED, WAIT_OBJECT_0, WAIT_TIMEOUT, WAIT_FAILED Google Microsoft
|
| HANDLE BeginThread() It creates a thread. If error, it returns zero. Otherwise, it returns a handle to the new thread You MUST create a new class overriding ThreadObjectX::ThreadFunc(...) Google Microsoft
|
| HANDLE BeginThread(Mt::IThreadX& ithreadX) It creates a thread. If error, it returns zero. Otherwise, it returns a handle to the new thread Google Microsoft
|
| HANDLE GetHandle() |
| ThreadObjectX() |
| bool GetExitCode(DWORD& out_threadExitCode) It retrieves the termination status of the specified thread This function returns immediately. If the specified thread has not terminated and the function succeeds, the status returned is STILL_ACTIVE. If the thread has terminated and the function succeeds, the status returned is one of the following values:The exit value specified in the ExitThread or TerminateThread function, the return value from the thread function Google Microsoft
|
| bool IsStillActive() |
| operator HANDLE() const |
| operator const HANDLE() const |
| unsigned int GetThreadID() const |
| void Close() It closes the handle of the thread Google Microsoft
|
| ~ ThreadObjectX() |
| DWORD WaitForAll() It waits until all the threads in the pool are completed. It returns: WAIT_TIMEOUT, WAIT_FAILED,... Google Microsoft
|
| DWORD WaitForOne(size_t threadIndex) It wait until the specified thread in the pool completes execution.
|
| Mt::ThreadObjectX& operator [ ](size_t threadIndex) |
| Mt::ThreadPool& operator =(const Mt::ThreadPool& init) |
| ThreadPool() |
| ThreadPool(const Mt::ThreadPool& init) |
| bool AreAllThreadsStopped() |
| bool BeginOne(size_t threadIndex, Mt::IThreadX& ithreadX) It begins the execution of the specified thread in the pool. It returns true if successful Google Microsoft
|
| bool Reset() It destroys the threads in the pool and creates a new set of threads
|
| bool SetNumThreads(size_t numThreads) |
| int WaitForOne() It returns the thread index or -1 if error
|
| size_t Begin(Mt::IThreadX& ithreadX, size_t numThreads) It begins the execution of specified number of threads in the pool. It returns the number of threads that started if error Google Microsoft
|
| size_t BeginAll(Mt::IThreadX& ithreadX) It begins the execution of all the threads in the pool. It returns the number of threads that startedif error Google Microsoft
|
| size_t GetNumActiveThreads() It return the number of threads that are active (running)
|
| size_t GetNumThreads() |
| void Cancel() It set the cancel variable of each thread to true
|
| void Delete() It deletes all threads in the pool
|
| ~ ThreadPool() |